package com.neusoft.neuiotms.dcam.workflow.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.neusoft.neuiotms.dcam.workflow.model.DiaoboKJ;

public interface DiaoboKJRepository extends JpaRepository<DiaoboKJ, Long> {

    DiaoboKJ findByTaskId(String taskId);

    DiaoboKJ findByWorkOrderNumAndTaskId(String workOrderNum, String taskId);

    List<DiaoboKJ> findByWorkOrderNum(String workOrderNum);

    List<DiaoboKJ> findAllByWorkOrderNumOrderByCreateTimeDesc(String workOrderNum);

    DiaoboKJ findTopByWorkOrderNumOrderByCreateTimeDesc(String workOrderNum);
}
